package learn;

public class text {
	public static void main(String[] args) {
		final int[] cpu= {1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,0,1};
		final int[] python= {0,1,1,1,1,0,0,0,0,0,1,0,1,0,0,1,0,1};
		final int[] mlab= {1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,0,1};
		final int[] jlab= {1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,1,0,1};
		int i;
		int k=0;
		int j=0;
		int pre=0;
		int after=0;
		laboratory lab0 = new laboratory("python实验室");
		laboratory lab1 = new laboratory("c语言实验室");
		laboratory lab2 = new laboratory("Python实验室");
		laboratory lab3 = new laboratory("计算机实验室");
		students stu0=new students("小李",2020310555,new laboratory[] {lab1,lab2});
		students stu1=new students("小刘",2020310556,new laboratory[] {lab0,lab1,lab2});
		System.out.println("姓名:"+stu0.name+" 学号:"+stu0.id);
		System.out.println(stu0.lab[0].name);
		System.out.println(stu0.lab[1].name);
		for(i=0;i<18;i++) {
			if(mlab[i]==1) {
				k++;
			}
			if(mlab[i]==0) {
				j++;
			}
			if(python[i]==1) {
				k++;
			}
			if(python[i]==0) {
				j++;
			}
		}
		try {
		pre = k*200+j*180;
	    after = (int) (0.7*pre);
		System.out.println("收税前:"+pre+"元");
		System.out.println("收税前:"+after+"元");  
		}
		catch(Exception e){
		System.out.println("错误");
		}
		int k1=0;
		int j1=0;
		int pre1=0;
		int after1=0;
		System.out.println("姓名:"+stu1.name+" 学号:"+stu1.id);
		System.out.println(stu1.lab[0].name);
		System.out.println(stu1.lab[1].name);
		System.out.println(stu1.lab[2].name);
		for(i=0;i<18;i++) {
			if(mlab[i]==1) {
				k1++;
			}
			if(mlab[i]==0) {
				j1++;
			}
			if(python[i]==1) {
				k1++;
			}
			if(python[i]==0) {
				j1++;
			}
			if(cpu[i]==1) {
				k1++;
			}
			if(cpu[i]==0) {
				j1++;
			}
		}
		
		pre1 = k1*200+j1*180;
	    after1 = (int) (0.7*pre1);
		System.out.println("收税前:"+pre1+"元");
		System.out.println("收税前:"+after1+"元");


	}
}
